// debugger;
import { ElMessage } from "element-plus";

function detectDevTools() {
  const threshold = 160;
  setInterval(() => {
    const widthThreshold = window.outerWidth - window.innerWidth > threshold;
    const heightThreshold = window.outerHeight - window.innerHeight > threshold;
    if (widthThreshold || heightThreshold) {
      alert("同学请关闭开发者工具-继续考试。");
      // ElMessage({
      //   message: "请勿单击右键，你现在考试！",
      //   type: "error",
      //   plain: true,
      // });
      window.location.reload();
    }
  }, 1000);
}

detectDevTools();
